Skip to content

chore(platform): modern browser targets + websocket upgrade - #8541

Open
tim2000s wants to merge 15 commits into
nightscout:masterfrom
tim2000s:pr/platform
Open

chore(platform): modern browser targets + websocket upgrade#8541
tim2000s wants to merge 15 commits into
nightscout:masterfrom
tim2000s:pr/platform

Conversation

@tim2000s

Copy link
Copy Markdown

chore(platform): modern browser targets + websocket upgrade

Two infrastructure changes, deliberately isolated from the feature work for separate review/discussion. Part of a UI-modernization series.

1. Browser targets → ES2020

Replaces the iOS-9-era .browserslistrc with a package.json browserslist targeting evergreen browsers (Chrome/Edge ≥ 80, Firefox ≥ 78, Safari/iOS ≥ 13.x), letting Babel emit ES2020 instead of ES5 (smaller, faster bundle).

⚠️ This drops support for very old browsers/devices. Some Nightscout users run old hand-me-down phones as display units, so this is a deliberate policy trade-off for the maintainers to weigh — not a silent build tweak.

2. WebSocket upgrade

socket.io clients now negotiate ['polling', 'websocket'] (polling first, then upgrade) instead of polling-only.

Polling-only was an intentional choice (#7793) — almost certainly to avoid websocket breakage behind some Azure/Heroku/nginx reverse proxies. This re-enables the websocket upgrade while keeping polling as the first transport and fallback. Please confirm this won't regress your hosted/proxy setups — if it's risky, I'm happy to drop this half of the PR.

Testing

Production bundle builds with the new targets; npx browserslist resolves the intended minimums.

🤖 Generated with Claude Code

tim2000s and others added 15 commits February 15, 2018 08:55
- Replace the legacy .browserslistrc (iOS 9 era) with a package.json browserslist
  targeting evergreen browsers (Chrome/Edge >= 80, Firefox >= 78, Safari/iOS >=
  13.x), so Babel can emit ES2020 instead of ES5. NOTE: this drops support for
  very old browsers/devices -- a deliberate maintainer decision.
- socket.io clients negotiate ['polling','websocket'] (polling first, then
  upgrade) instead of polling-only, while still falling back to polling behind
  proxies that block websockets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant